Skip to content

chore(all): enable tsconfig noUnusedLocals compiler option#17541

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-31-chore_enable_tsconfig_nounusedlocals_compiler_option
Dec 31, 2025
Merged

chore(all): enable tsconfig noUnusedLocals compiler option#17541
graphite-app[bot] merged 1 commit intomainfrom
12-31-chore_enable_tsconfig_nounusedlocals_compiler_option

Conversation

@Sysix
Copy link
Copy Markdown
Member

@Sysix Sysix commented Dec 31, 2025

Unused local variables did not get reported by @typescript-eslint/no-unused-vars.
Added noUnusedLocals check for every tsconfig, so pnpm lint will report them.
Example of failed CI: https://github.com/oxc-project/oxc/actions/runs/20626453016/job/59237769046?pr=17541

@github-actions github-actions bot added the A-editor Area - Editor and Language Server label Dec 31, 2025
Copy link
Copy Markdown
Member Author

Sysix commented Dec 31, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sysix Sysix force-pushed the 12-31-chore_enable_tsconfig_nounusedlocals_compiler_option branch from 53a3211 to a91cd64 Compare December 31, 2025 20:20
@github-actions github-actions bot added A-linter Area - Linter A-parser Area - Parser A-cli Area - CLI A-minifier Area - Minifier A-transformer Area - Transformer / Transpiler A-formatter Area - Formatter labels Dec 31, 2025
@Sysix Sysix marked this pull request as ready for review December 31, 2025 20:25
@Sysix Sysix requested a review from camc314 as a code owner December 31, 2025 20:25
Copilot AI review requested due to automatic review settings December 31, 2025 20:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables the noUnusedLocals TypeScript compiler option across all tsconfig.json files in the project to catch unused local variables during compilation, addressing a gap where @typescript-eslint/no-unused-vars was not reporting these issues.

Key Changes:

  • Added "noUnusedLocals": true to 8 tsconfig.json files across different project directories
  • Removed an unused linterVersion field from the LinterTool class in the VSCode extension

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tasks/e2e/tsconfig.json Added noUnusedLocals compiler option
plugins/tsconfig.json Added noUnusedLocals compiler option
napi/transform/tsconfig.json Added noUnusedLocals compiler option
napi/parser/tsconfig.json Added noUnusedLocals compiler option
napi/minify/tsconfig.json Added noUnusedLocals compiler option
editors/vscode/tsconfig.json Added noUnusedLocals compiler option
editors/vscode/client/tools/linter.ts Removed unused linterVersion property that was caught by the new compiler option
apps/oxlint/tsconfig.json Added noUnusedLocals compiler option
apps/oxfmt/tsconfig.json Added noUnusedLocals compiler option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@camc314 camc314 changed the title chore: enable tsconfig noUnusedLocals compiler option chore(all): enable tsconfig noUnusedLocals compiler option Dec 31, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 31, 2025
@camc314 camc314 self-assigned this Dec 31, 2025
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Dec 31, 2025
Copy link
Copy Markdown
Contributor

camc314 commented Dec 31, 2025

Merge activity

Unused local variables did not get reported by `@typescript-eslint/no-unused-vars`.
Added `noUnusedLocals` check for every tsconfig, so `pnpm lint` will report them.
Example of failed CI: https://github.com/oxc-project/oxc/actions/runs/20626453016/job/59237769046?pr=17541
@graphite-app graphite-app bot force-pushed the 12-31-chore_enable_tsconfig_nounusedlocals_compiler_option branch from a91cd64 to e8e42eb Compare December 31, 2025 20:31
@graphite-app graphite-app bot merged commit e8e42eb into main Dec 31, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 12-31-chore_enable_tsconfig_nounusedlocals_compiler_option branch December 31, 2025 20:37
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-editor Area - Editor and Language Server A-formatter Area - Formatter A-linter Area - Linter A-minifier Area - Minifier A-parser Area - Parser A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants